﻿using System.Text;

namespace ChangeTextWPF
{
    class EncodingInfoExtended
    {
        private readonly EncodingInfo _encodingInfo;

        public Encoding Encoding
        {
            get { return Encoding.GetEncoding(_encodingInfo.Name); }
        }

        public EncodingInfoExtended(EncodingInfo info)
        {
            _encodingInfo = info;
        }

        public override string ToString()
        {
            return string.Format("{0} ({1})",_encodingInfo.DisplayName,_encodingInfo.Name);
        }
    }
}
